1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to the intraprediction of a video, and more particularly, to intraprediction which improves compression efficiency using the symmetry of a video in the intraprediction of the video and video encoding and decoding using the intraprediction method.
2. Description of the Related Art
In well-known video compression standards such as MPEG-1, MPEG-2, MPEG-4 Visual, H.261, H.263, and H.264, a picture is generally divided into macroblocks for video encoding. After each of the macroblocks is encoded in all encoding modes available in interprediction and intraprediction, bit rates required for encoding of the macroblock and rate-distortion (RD) costs between the original macroblock and a decoded macroblock in encoding modes are compared. Then an appropriate encoding mode is selected according to the result of the comparison and the macroblock is encoded in the selected encoding mode.
In intraprediction, a prediction value of a macroblock to be encoded is predicted using a pixel value of a pixel that is spatially adjacent to the macroblock to be encoded and a difference between the prediction value and the original pixel value is encoded, instead of referring to reference pictures, in order to encode macroblocks of a current picture.
FIG. 1 illustrates previous macroblocks used for the intraprediction of a current macroblock a5 according to prior art.
Referring to FIG. 1, previous macroblocks a1, a2, a3, and a4 are used for the intraprediction of a current macroblock a5. According to a raster scan scheme, macroblocks included in a picture are scanned left-to-right and top-to-bottom. Thus, the previous macroblocks a1, a2, a3, and a4 are already scanned and encoded before the current macroblock a5. Because macroblocks marked with X are not encoded, they cannot be used for predictive encoding of the current macroblock a5. Because macroblocks marked with O have low correlation with the current macroblock a5, they are not used for predictive encoding of the current macroblock a5. After being discrete cosine transformed and quantized, the previous macroblocks a1, a2, a3, and a4 are inversely quantized and inversely discrete cosine transformed and are then reconstructed.
FIG. 2 is a reference diagram for explaining adjacent pixels used in intra 4×4 modes of H.264 according to prior art.
Referring to FIG. 2, lower-case letters a through p indicate pixels of a 4×4 block to be predicted, and upper-case letters A through M located above and on the left side of the 4×4 block indicate adjacent samples or pixels required for intraprediction of the 4×4 block, which have been already encoded and reconstructed.
FIG. 3 illustrates intra 4×4 modes used in H.264 according to prior art.
Referring to FIG. 3, the intra 4×4 modes include a total of 9 modes, i.e., a direct current (DC) mode, a vertical mode, a horizontal mode, a diagonal down-left mode, a diagonal down-right mode, a vertical left mode, a vertical right mode, a horizontal up mode, and a horizontal down mode. In the intra 4×4 modes, pixel values of pixels a through p are predicted from pixels A through M of adjacent macroblocks. As illustrated in FIG. 3, in the intra 4×4 modes, adjacent pixels in a frame including a block to be intrapredicted are used as reference pixels. As such, in an intraprediction method according to prior art, a prediction value of a macroblock to be encoded is calculated using pixel values of pixels that are spatially adjacent to the macroblock to be encoded. In many cases, objects included in a video are symmetric with respect to a predetermined axis. However, in an intraprediction method according to prior art, prediction is performed by merely using adjacent pixels without efficiently using such symmetry.